<template>
  <el-table
    :data="tableData"
    border
    style="width: 50%">
    <el-table-column
      prop="date"
      label="日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址">
    </el-table-column>
    <el-table-column
      prop="isAppiont"
      label="是否接受"
      width="180"
      type="radio">
      <template slot-scope="scope">
        <el-radio label="是" v-model="scope.row.isAppiont" @change="changeRadio(scope.row)">是</el-radio>
        <el-radio label="否" v-model="scope.row.isAppiont" @change="changeRadio(scope.row)">否</el-radio>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    mounted(){
      console.log(this.tableData);
    },
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          surfaceIndex: 0,
          isAppiont:''
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄',
          surfaceIndex: 1,
          isAppiont:''
        }]
      }
    },
    methods:{
      changeRadio(val1){
        console.log(val1,'row');
      }
    }
  }
</script>

